package com.studyweb.pojo.entity;

import java.time.LocalDateTime;

/**
 * 试卷题目关联实体类
 */
public class PaperQuestion {
    private Long id;
    private Long paperId;
    private Long questionId;
    private String questionType; // 题目类型: politics, commonSense, language, quantity, judgment, dataAnalysis
    private Integer questionOrder; // 题目顺序
    private LocalDateTime createTime; // 创建时间

    // 构造函数
    public PaperQuestion() {}

    public PaperQuestion(Long paperId, Long questionId, String questionType, Integer questionOrder) {
        this.paperId = paperId;
        this.questionId = questionId;
        this.questionType = questionType;
        this.questionOrder = questionOrder;
        this.createTime = LocalDateTime.now();
    }

    // Getter和Setter方法
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPaperId() {
        return paperId;
    }

    public void setPaperId(Long paperId) {
        this.paperId = paperId;
    }

    public Long getQuestionId() {
        return questionId;
    }

    public void setQuestionId(Long questionId) {
        this.questionId = questionId;
    }

    public String getQuestionType() {
        return questionType;
    }

    public void setQuestionType(String questionType) {
        this.questionType = questionType;
    }

    public Integer getQuestionOrder() {
        return questionOrder;
    }

    public void setQuestionOrder(Integer questionOrder) {
        this.questionOrder = questionOrder;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "PaperQuestion{" +
                "id=" + id +
                ", paperId=" + paperId +
                ", questionId=" + questionId +
                ", questionType='" + questionType + '\'' +
                ", questionOrder=" + questionOrder +
                ", createTime=" + createTime +
                '}';
    }
}